<?php

/**
 * Description of MantUsuario
 *
 * @author EaDeveloper
 *
 */
class ModDistribuidora extends FastMaintenance {

    public function __construct() {
        $this->table = "kairos_distribuidora";
        $this->gridCols = array("idkairos_distribuidora", "nombre", "estado");
        $this->fieldsConfig = array("idkairos_distribuidora" => "Codigo", "nombre" => "Nombre",
            "estado" => array("Estado", array("1" => "Activa",
                    "0" => "Inactiva")));
        $this->pkFields = array("idkairos_distribuidora");
        $this->autoPK = true;
        $this->tittle = "Mantenimiento de Distribuidoras";
        $this->windowTittle = $this->tittle;
        $this->instanceName = "ModDistribuidora";
        $this->db = DbManager::getMe();
    }

    public function main() {
        $r = $this->db->queryToArray("select * from kairos_pais ");
        $v = array();
        foreach ($r as $f) {
            $v[$f["idkairos_pais"]] = $f["nombre"];
        }
        $this->fieldsConfig["kairos_pais"] = array("Pais", $v);
        parent::main();
    }

}

?>
